#pragma once
#include <dialects/Builtin/Dialect.h>
#include <lcir/IR/Type.h>
namespace lcir::builtin {
class BoolType : public BasicTypeCRTP<BoolType, BuiltinDialect> {
public:
  BoolType() : BasicTypeCRTP("bool") {}
};

class Int32Type : public BasicTypeCRTP<Int32Type, BuiltinDialect> {
public:
  Int32Type() : BasicTypeCRTP("int32") {}
};

class FloatType : public BasicTypeCRTP<FloatType, BuiltinDialect> {
public:
  FloatType() : BasicTypeCRTP("float") {}
};

class UnkownType : public BasicTypeCRTP<UnkownType, BuiltinDialect> {
public:
  UnkownType() : BasicTypeCRTP("unkown") {}
};

class Pointer : public ComplexTypeCRTP<Pointer, BuiltinDialect> {
  Type *elementType; // 指针指向的类型
public:
  Pointer() : ComplexTypeCRTP("pointer"){};
  Pointer(Type *ty) : Pointer() { elementType = ty; }
  Type *getElementType() { return elementType; }
};

} // namespace lcir::builtin